import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class SpinService {

  /**
   * 设置全局loading对象
   *
   * @private
   * @memberof SpinService
   */
  private golbalSpin=new BehaviorSubject<boolean>(false);
  constructor() { }

  setCurrentGolbalSpinStore(isSpining:boolean):void {
    this.golbalSpin.next(isSpining);
  }
  getCurrentGlobalSpinStore(): Observable<boolean> {
    return this.golbalSpin.asObservable();
  }

  
}
